
package com.contractproductpricemodule.bean;

import java.io.Serializable;

import com.contractmodule.bean.TbContract;
import com.contractmodule.dao.TbContractDAO;
import com.productpricemiddlemodule.bean.TbProductPriceMiddle;
import com.productpricemiddlemodule.dao.TbProductPriceMiddleDAO;

public class TbContractProductPrice implements Serializable{

    private int contractProductPriceId;

    private int productPriceMiddleId;
    private TbProductPriceMiddle tbProductPriceMiddle;
    private String contractCode;
    private TbContract tbContract;

    public int getContractProductPriceId(){
        return contractProductPriceId;
    }

    public void setContractProductPriceId(int contractProductPriceId){
        this.contractProductPriceId = contractProductPriceId;
    }

    public int getProductPriceMiddleId(){
        return productPriceMiddleId;
    }

    public void setProductPriceMiddleId(int productPriceMiddleId){
        this.productPriceMiddleId = productPriceMiddleId;
        this.tbProductPriceMiddle=new TbProductPriceMiddleDAO().getTbProductPriceMiddleByProductPriceMiddleId(productPriceMiddleId);
    }

    public String getContractCode(){
        return contractCode;
    }

    public void setContractCode(String contractCode){
        this.contractCode = contractCode;
        this.tbContract=new TbContractDAO().getTbContractByContractCode(contractCode);
    }

    public TbProductPriceMiddle getTbProductPriceMiddle() {
		return tbProductPriceMiddle;
	}

	public void setTbProductPriceMiddle(TbProductPriceMiddle tbProductPriceMiddle) {
		this.tbProductPriceMiddle = tbProductPriceMiddle;
	}

	public TbContract getTbContract() {
		return tbContract;
	}

	public void setTbContract(TbContract tbContract) {
		this.tbContract = tbContract;
	}

	public TbContractProductPrice(){
    }
    public TbContractProductPrice(int productPriceMiddleId,String contractCode){
        this.productPriceMiddleId = productPriceMiddleId;
        this.contractCode = contractCode;
    }
}

